import React from 'react'

export default class Text extends React.Component {
  render() {
    if (this.props.text && this.props.text.startsWith('http')) {
      return <a href={ this.props.text }>{ this.props.text }</a>
    } else {
      return <p>{ this.props.text }</p>
    }
  }
}